Integrand size = 16, antiderivative size = 81 \[ \int \frac {\cosh ^2(a+b x)}{(c+d x)^2} \, dx=-\frac {\cosh ^2(a+b x)}{d (c+d x)}+\frac {b \text {Chi}\left (\frac {2 b c}{d}+2 b x\right ) \sinh \left (2 a-\frac {2 b c}{d}\right )}{d^2}+\frac {b \cosh \left (2 a-\frac {2 b c}{d}\right ) \text {Shi}\left (\frac {2 b c}{d}+2 b x\right )}{d^2} \]
-cosh(b*x+a)^2/d/(d*x+c)+b*cosh(2*a-2*b*c/d)*Shi(2*b*c/d+2*b*x)/d^2+b*Chi( 2*b*c/d+2*b*x)*sinh(2*a-2*b*c/d)/d^2
Time = 0.29 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.93 \[ \int \frac {\cosh ^2(a+b x)}{(c+d x)^2} \, dx=\frac {-\frac {d \cosh ^2(a+b x)}{c+d x}+b \text {Chi}\left (\frac {2 b (c+d x)}{d}\right ) \sinh \left (2 a-\frac {2 b c}{d}\right )+b \cosh \left (2 a-\frac {2 b c}{d}\right ) \text {Shi}\left (\frac {2 b (c+d x)}{d}\right )}{d^2} \]
(-((d*Cosh[a + b*x]^2)/(c + d*x)) + b*CoshIntegral[(2*b*(c + d*x))/d]*Sinh [2*a - (2*b*c)/d] + b*Cosh[2*a - (2*b*c)/d]*SinhIntegral[(2*b*(c + d*x))/d ])/d^2
Result contains complex when optimal does not.
Time = 0.55 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.16, number of steps used = 11, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.688, Rules used = {3042, 3794, 27, 3042, 26, 3784, 26, 3042, 26, 3779, 3782}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cosh ^2(a+b x)}{(c+d x)^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin \left (i a+i b x+\frac {\pi }{2}\right )^2}{(c+d x)^2}dx\) |
\(\Big \downarrow \) 3794 |
\(\displaystyle -\frac {\cosh ^2(a+b x)}{d (c+d x)}+\frac {2 i b \int -\frac {i \sinh (2 a+2 b x)}{2 (c+d x)}dx}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {b \int \frac {\sinh (2 a+2 b x)}{c+d x}dx}{d}-\frac {\cosh ^2(a+b x)}{d (c+d x)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\cosh ^2(a+b x)}{d (c+d x)}+\frac {b \int -\frac {i \sin (2 i a+2 i b x)}{c+d x}dx}{d}\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -\frac {\cosh ^2(a+b x)}{d (c+d x)}-\frac {i b \int \frac {\sin (2 i a+2 i b x)}{c+d x}dx}{d}\) |
\(\Big \downarrow \) 3784 |
\(\displaystyle -\frac {\cosh ^2(a+b x)}{d (c+d x)}-\frac {i b \left (i \sinh \left (2 a-\frac {2 b c}{d}\right ) \int \frac {\cosh \left (\frac {2 b c}{d}+2 b x\right )}{c+d x}dx+\cosh \left (2 a-\frac {2 b c}{d}\right ) \int \frac {i \sinh \left (\frac {2 b c}{d}+2 b x\right )}{c+d x}dx\right )}{d}\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -\frac {\cosh ^2(a+b x)}{d (c+d x)}-\frac {i b \left (i \sinh \left (2 a-\frac {2 b c}{d}\right ) \int \frac {\cosh \left (\frac {2 b c}{d}+2 b x\right )}{c+d x}dx+i \cosh \left (2 a-\frac {2 b c}{d}\right ) \int \frac {\sinh \left (\frac {2 b c}{d}+2 b x\right )}{c+d x}dx\right )}{d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\cosh ^2(a+b x)}{d (c+d x)}-\frac {i b \left (i \sinh \left (2 a-\frac {2 b c}{d}\right ) \int \frac {\sin \left (\frac {2 i b c}{d}+2 i b x+\frac {\pi }{2}\right )}{c+d x}dx+i \cosh \left (2 a-\frac {2 b c}{d}\right ) \int -\frac {i \sin \left (\frac {2 i b c}{d}+2 i b x\right )}{c+d x}dx\right )}{d}\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -\frac {\cosh ^2(a+b x)}{d (c+d x)}-\frac {i b \left (i \sinh \left (2 a-\frac {2 b c}{d}\right ) \int \frac {\sin \left (\frac {2 i b c}{d}+2 i b x+\frac {\pi }{2}\right )}{c+d x}dx+\cosh \left (2 a-\frac {2 b c}{d}\right ) \int \frac {\sin \left (\frac {2 i b c}{d}+2 i b x\right )}{c+d x}dx\right )}{d}\) |
\(\Big \downarrow \) 3779 |
\(\displaystyle -\frac {\cosh ^2(a+b x)}{d (c+d x)}-\frac {i b \left (i \sinh \left (2 a-\frac {2 b c}{d}\right ) \int \frac {\sin \left (\frac {2 i b c}{d}+2 i b x+\frac {\pi }{2}\right )}{c+d x}dx+\frac {i \cosh \left (2 a-\frac {2 b c}{d}\right ) \text {Shi}\left (\frac {2 b c}{d}+2 b x\right )}{d}\right )}{d}\) |
\(\Big \downarrow \) 3782 |
\(\displaystyle -\frac {\cosh ^2(a+b x)}{d (c+d x)}-\frac {i b \left (\frac {i \sinh \left (2 a-\frac {2 b c}{d}\right ) \text {Chi}\left (\frac {2 b c}{d}+2 b x\right )}{d}+\frac {i \cosh \left (2 a-\frac {2 b c}{d}\right ) \text {Shi}\left (\frac {2 b c}{d}+2 b x\right )}{d}\right )}{d}\) |
-(Cosh[a + b*x]^2/(d*(c + d*x))) - (I*b*((I*CoshIntegral[(2*b*c)/d + 2*b*x ]*Sinh[2*a - (2*b*c)/d])/d + (I*Cosh[2*a - (2*b*c)/d]*SinhIntegral[(2*b*c) /d + 2*b*x])/d))/d
3.1.13.3.1 Defintions of rubi rules used
Int[(Complex[0, a_])*(Fx_), x_Symbol] :> Simp[(Complex[Identity[0], a]) I nt[Fx, x], x] /; FreeQ[a, x] && EqQ[a^2, 1]
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[sin[(e_.) + (Complex[0, fz_])*(f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbo l] :> Simp[I*(SinhIntegral[c*f*(fz/d) + f*fz*x]/d), x] /; FreeQ[{c, d, e, f , fz}, x] && EqQ[d*e - c*f*fz*I, 0]
Int[sin[(e_.) + (Complex[0, fz_])*(f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbo l] :> Simp[CoshIntegral[c*f*(fz/d) + f*fz*x]/d, x] /; FreeQ[{c, d, e, f, fz }, x] && EqQ[d*(e - Pi/2) - c*f*fz*I, 0]
Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[Cos[(d* e - c*f)/d] Int[Sin[c*(f/d) + f*x]/(c + d*x), x], x] + Simp[Sin[(d*e - c* f)/d] Int[Cos[c*(f/d) + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f}, x] && NeQ[d*e - c*f, 0]
Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)]^(n_), x_Symbol] :> Si mp[(c + d*x)^(m + 1)*(Sin[e + f*x]^n/(d*(m + 1))), x] - Simp[f*(n/(d*(m + 1 ))) Int[ExpandTrigReduce[(c + d*x)^(m + 1), Cos[e + f*x]*Sin[e + f*x]^(n - 1), x], x], x] /; FreeQ[{c, d, e, f, m}, x] && IGtQ[n, 1] && GeQ[m, -2] & & LtQ[m, -1]
Time = 0.36 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.88
method | result | size |
risch | \(-\frac {1}{2 \left (d x +c \right ) d}-\frac {b \,{\mathrm e}^{-2 b x -2 a}}{4 d \left (d x b +c b \right )}+\frac {b \,{\mathrm e}^{-\frac {2 \left (d a -c b \right )}{d}} \operatorname {Ei}_{1}\left (2 b x +2 a -\frac {2 \left (d a -c b \right )}{d}\right )}{2 d^{2}}-\frac {b \,{\mathrm e}^{2 b x +2 a}}{4 d^{2} \left (\frac {b c}{d}+b x \right )}-\frac {b \,{\mathrm e}^{\frac {2 d a -2 c b}{d}} \operatorname {Ei}_{1}\left (-2 b x -2 a -\frac {2 \left (-d a +c b \right )}{d}\right )}{2 d^{2}}\) | \(152\) |
-1/2/(d*x+c)/d-1/4*b*exp(-2*b*x-2*a)/d/(b*d*x+b*c)+1/2*b/d^2*exp(-2*(a*d-b *c)/d)*Ei(1,2*b*x+2*a-2*(a*d-b*c)/d)-1/4*b/d^2*exp(2*b*x+2*a)/(b*c/d+b*x)- 1/2*b/d^2*exp(2*(a*d-b*c)/d)*Ei(1,-2*b*x-2*a-2*(-a*d+b*c)/d)
Leaf count of result is larger than twice the leaf count of optimal. 164 vs. \(2 (81) = 162\).
Time = 0.26 (sec) , antiderivative size = 164, normalized size of antiderivative = 2.02 \[ \int \frac {\cosh ^2(a+b x)}{(c+d x)^2} \, dx=-\frac {d \cosh \left (b x + a\right )^{2} + d \sinh \left (b x + a\right )^{2} - {\left ({\left (b d x + b c\right )} {\rm Ei}\left (\frac {2 \, {\left (b d x + b c\right )}}{d}\right ) - {\left (b d x + b c\right )} {\rm Ei}\left (-\frac {2 \, {\left (b d x + b c\right )}}{d}\right )\right )} \cosh \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right ) - {\left ({\left (b d x + b c\right )} {\rm Ei}\left (\frac {2 \, {\left (b d x + b c\right )}}{d}\right ) + {\left (b d x + b c\right )} {\rm Ei}\left (-\frac {2 \, {\left (b d x + b c\right )}}{d}\right )\right )} \sinh \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right ) + d}{2 \, {\left (d^{3} x + c d^{2}\right )}} \]
-1/2*(d*cosh(b*x + a)^2 + d*sinh(b*x + a)^2 - ((b*d*x + b*c)*Ei(2*(b*d*x + b*c)/d) - (b*d*x + b*c)*Ei(-2*(b*d*x + b*c)/d))*cosh(-2*(b*c - a*d)/d) - ((b*d*x + b*c)*Ei(2*(b*d*x + b*c)/d) + (b*d*x + b*c)*Ei(-2*(b*d*x + b*c)/d ))*sinh(-2*(b*c - a*d)/d) + d)/(d^3*x + c*d^2)
\[ \int \frac {\cosh ^2(a+b x)}{(c+d x)^2} \, dx=\int \frac {\cosh ^{2}{\left (a + b x \right )}}{\left (c + d x\right )^{2}}\, dx \]
Time = 0.23 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.09 \[ \int \frac {\cosh ^2(a+b x)}{(c+d x)^2} \, dx=-\frac {e^{\left (-2 \, a + \frac {2 \, b c}{d}\right )} E_{2}\left (\frac {2 \, {\left (d x + c\right )} b}{d}\right )}{4 \, {\left (d x + c\right )} d} - \frac {e^{\left (2 \, a - \frac {2 \, b c}{d}\right )} E_{2}\left (-\frac {2 \, {\left (d x + c\right )} b}{d}\right )}{4 \, {\left (d x + c\right )} d} - \frac {1}{2 \, {\left (d^{2} x + c d\right )}} \]
-1/4*e^(-2*a + 2*b*c/d)*exp_integral_e(2, 2*(d*x + c)*b/d)/((d*x + c)*d) - 1/4*e^(2*a - 2*b*c/d)*exp_integral_e(2, -2*(d*x + c)*b/d)/((d*x + c)*d) - 1/2/(d^2*x + c*d)
Leaf count of result is larger than twice the leaf count of optimal. 574 vs. \(2 (81) = 162\).
Time = 0.30 (sec) , antiderivative size = 574, normalized size of antiderivative = 7.09 \[ \int \frac {\cosh ^2(a+b x)}{(c+d x)^2} \, dx=-\frac {{\left (2 \, {\left (d x + c\right )} {\left (b - \frac {b c}{d x + c} + \frac {a d}{d x + c}\right )} b^{2} {\rm Ei}\left (-\frac {2 \, {\left ({\left (d x + c\right )} {\left (b - \frac {b c}{d x + c} + \frac {a d}{d x + c}\right )} + b c - a d\right )}}{d}\right ) e^{\left (\frac {2 \, {\left (b c - a d\right )}}{d}\right )} + 2 \, b^{3} c {\rm Ei}\left (-\frac {2 \, {\left ({\left (d x + c\right )} {\left (b - \frac {b c}{d x + c} + \frac {a d}{d x + c}\right )} + b c - a d\right )}}{d}\right ) e^{\left (\frac {2 \, {\left (b c - a d\right )}}{d}\right )} - 2 \, a b^{2} d {\rm Ei}\left (-\frac {2 \, {\left ({\left (d x + c\right )} {\left (b - \frac {b c}{d x + c} + \frac {a d}{d x + c}\right )} + b c - a d\right )}}{d}\right ) e^{\left (\frac {2 \, {\left (b c - a d\right )}}{d}\right )} - 2 \, {\left (d x + c\right )} {\left (b - \frac {b c}{d x + c} + \frac {a d}{d x + c}\right )} b^{2} {\rm Ei}\left (\frac {2 \, {\left ({\left (d x + c\right )} {\left (b - \frac {b c}{d x + c} + \frac {a d}{d x + c}\right )} + b c - a d\right )}}{d}\right ) e^{\left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right )} - 2 \, b^{3} c {\rm Ei}\left (\frac {2 \, {\left ({\left (d x + c\right )} {\left (b - \frac {b c}{d x + c} + \frac {a d}{d x + c}\right )} + b c - a d\right )}}{d}\right ) e^{\left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right )} + 2 \, a b^{2} d {\rm Ei}\left (\frac {2 \, {\left ({\left (d x + c\right )} {\left (b - \frac {b c}{d x + c} + \frac {a d}{d x + c}\right )} + b c - a d\right )}}{d}\right ) e^{\left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right )} + b^{2} d e^{\left (\frac {2 \, {\left (d x + c\right )} {\left (b - \frac {b c}{d x + c} + \frac {a d}{d x + c}\right )}}{d}\right )} + b^{2} d e^{\left (-\frac {2 \, {\left (d x + c\right )} {\left (b - \frac {b c}{d x + c} + \frac {a d}{d x + c}\right )}}{d}\right )} + 2 \, b^{2} d\right )} d^{2}}{4 \, {\left ({\left (d x + c\right )} {\left (b - \frac {b c}{d x + c} + \frac {a d}{d x + c}\right )} d^{4} + b c d^{4} - a d^{5}\right )} b} \]
-1/4*(2*(d*x + c)*(b - b*c/(d*x + c) + a*d/(d*x + c))*b^2*Ei(-2*((d*x + c) *(b - b*c/(d*x + c) + a*d/(d*x + c)) + b*c - a*d)/d)*e^(2*(b*c - a*d)/d) + 2*b^3*c*Ei(-2*((d*x + c)*(b - b*c/(d*x + c) + a*d/(d*x + c)) + b*c - a*d) /d)*e^(2*(b*c - a*d)/d) - 2*a*b^2*d*Ei(-2*((d*x + c)*(b - b*c/(d*x + c) + a*d/(d*x + c)) + b*c - a*d)/d)*e^(2*(b*c - a*d)/d) - 2*(d*x + c)*(b - b*c/ (d*x + c) + a*d/(d*x + c))*b^2*Ei(2*((d*x + c)*(b - b*c/(d*x + c) + a*d/(d *x + c)) + b*c - a*d)/d)*e^(-2*(b*c - a*d)/d) - 2*b^3*c*Ei(2*((d*x + c)*(b - b*c/(d*x + c) + a*d/(d*x + c)) + b*c - a*d)/d)*e^(-2*(b*c - a*d)/d) + 2 *a*b^2*d*Ei(2*((d*x + c)*(b - b*c/(d*x + c) + a*d/(d*x + c)) + b*c - a*d)/ d)*e^(-2*(b*c - a*d)/d) + b^2*d*e^(2*(d*x + c)*(b - b*c/(d*x + c) + a*d/(d *x + c))/d) + b^2*d*e^(-2*(d*x + c)*(b - b*c/(d*x + c) + a*d/(d*x + c))/d) + 2*b^2*d)*d^2/(((d*x + c)*(b - b*c/(d*x + c) + a*d/(d*x + c))*d^4 + b*c* d^4 - a*d^5)*b)
Timed out. \[ \int \frac {\cosh ^2(a+b x)}{(c+d x)^2} \, dx=\int \frac {{\mathrm {cosh}\left (a+b\,x\right )}^2}{{\left (c+d\,x\right )}^2} \,d x \]